/**
 * Proyecto: Cognitum
 * Global IT Services 2008
 * @author Mislas
 */
 
Cognitum.Cartera.Direccion.Editor = Ext.extend(Karma.EBCard, {

	initComponent: function(){
		Ext.apply(this, {
			sections: [{
		        title: 'Direccion',
		        items: [{
	                fieldLabel: 'Nombre',
	                name: 'Nombre'
	            },{
					xtype: 'enum.combo',
					enumName: 'Cognitum.Dominio.Cartera.TipoDireccionEnum',
	                fieldLabel: 'Tipo',
	                name: 'Tipo'
	            },{
					xtype: 'entity.link',
					entityName: 'Paises',
	                fieldLabel: 'Pais',
	                name: 'Pais'
	            },{
					xtype: 'entity.link',
					entityName: 'Estados',
	                fieldLabel: 'Estado',
	                name: 'Estado',
					contextTriggers: [{ 
						id: 'Pais',
						query: 'p.Pais.Id=?'
					}]
	            },{
	                fieldLabel: 'Calle',
	                name: 'Calle'
	            },{
	                fieldLabel: 'N&uacute;mero (int)',
	                name: 'NumInterior',
					allowBlank: true
	            },{
	                fieldLabel: 'N&uacute;mero (ext)',
	                name: 'NumExterior'
	            },{
	                fieldLabel: 'Colonia',
	                name: 'Colonia'
	            },{
	                fieldLabel: 'Cp',
	                name: 'Cp'
	            },{
	                fieldLabel: 'Delegaci&oacute;n',
	                name: 'Delegacion',
					allowBlank: true
	            },{
	                xtype: 'entity.link',
	                entityName: 'Clientes',
	                fieldLabel: 'Cliente',
	                name: 'Cliente',
	                disabled: true
	            },{
	                xtype: 'enum.combo',
	                enumName: 'Cognitum.Dominio.Aplicacion.EstatusEnum',
	                fieldLabel: 'Estatus',
	                name: 'Estatus',
	                disabled: true
                }]
			},{
				xtype: 'aud.editor',
				title: 'Info registro'
			}]
		});
		Cognitum.Cartera.Direccion.Editor.superclass.initComponent.apply(this, arguments);
	}
});

Ext.reg('dir.editor', Cognitum.Cartera.Direccion.Editor);
